package com.le.tester.javaThink.fifth.chapter18_Str;

import java.util.Arrays;
import java.util.regex.Pattern;

/**
 * createTime：2021/8/13 16:45
 * description：切割成数组
 */
public class SplitDemo {
    public static void main(String[] args) {
        String input = "This!!unusual use!!of exclamation!!points";

        System.out.println(Arrays.toString(
                Pattern.compile("!!").split(input)));

        System.out.println(Arrays.toString(
                Pattern.compile("!!").split(input, 3)));
    }
}
